  //template function call by & does not hold
//because of template reduction
#include <iostream>
#include <algorithm>
#include <iterator>
#include <vector>
using namespace std;

template<typename T>
void negate0(T& c)
{
  c = -c;
}

int main()
{
  vector<int> v;
  for(int i = 1;i<5;i++){
    v.push_back(i*i);
  }
  for_each(&v[0],&v[v.size()],negate0<int>);

  //print
  copy(v.begin(),v.end(),ostream_iterator<int>(cout,"  "));
  cout<<endl;

  //----------------------------------------------
  for_each(&v[0],&v[v.size()],&negate0<int>);

  //print
  copy(v.begin(),v.end(),ostream_iterator<int>(cout,"  "));
  cout<<endl;

  int m = -5;
  negate0(m);
  cout<<m<<endl;
  //template functin call by & does not hold
  return 0;
}
